Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-12029. Move ozone debug recover to ozone admin om lease recover #7670

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

sarvekshayr
Copy link
Contributor

What changes were proposed in this pull request?

The ozone debug recover command that is currently used for lease recovery has a few problems:

  • It modifies the cluster, so it should not be under debug.
  • The name does not specify that it deals with leases.
  • It uses a standard API from the FileSystem interface unlike other low level tools in this package.

The command is unique because it goes through the FileSystem interface but is not exposed through the fs command line in Hadoop or Ozone. For these reasons, we propose moving this command to its own Ozone subcommand: ozone admin om lease recover. This also allows other lease related subcommands (like querying of existing leases) to be added in the future.

What is the link to the Apache JIRA

HDDS-12029

How was this patch tested?

Tested the patch on a docker cluster.

bash-5.1$ ozone admin om lease
Missing required subcommand
Usage: ozone admin om lease [COMMAND]
Command for all lease related queries.
Commands:
  recover  Recover the lease of a specified file. Make sure to specify file
             system scheme if ofs:// is not the default.
bash-5.1$ ozone admin om lease recover --path=/vol1/bucket1/key1
Lease recovery SUCCEEDED on /vol1/bucket1/key1

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sarvekshayr for the patch.

@errose28 errose28 added the tools Tools that helps with debugging label Jan 9, 2025
@errose28 errose28 requested review from jojochuang and smengcl January 9, 2025 14:41
@adoroszlai
Copy link
Contributor

@smengcl could you please review?

Copy link
Contributor

@Tejaskriya Tejaskriya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for working on this @sarvekshayr

@adoroszlai adoroszlai merged commit 2f6e229 into apache:master Jan 15, 2025
43 checks passed
@adoroszlai
Copy link
Contributor

Thanks @sarvekshayr for the patch, @Tejaskriya for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Tools that helps with debugging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants